package cn.toutatis.sandbox.root.security.service.entity;

import cn.toutatis.common.controllerDepand.EntityBasicAttribute;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

/**
 * <p>
 * 角色与权限关系
 * </p>
 *
 * @author Toutatis_Gc
 * @since 2020-08-13
 */
public class SystemRolePermissionRelation extends EntityBasicAttribute<SystemRolePermissionRelation> {

    private static final long serialVersionUID = 1L;

    /**
     * 自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 角色ID
     */
    @TableField("roleId")
    private String roleId;

    /**
     * 权限ID
     */
    @TableField("permissionId")
    private Integer permissionId;


    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }

    public Integer getPermissionId() {
        return permissionId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "\r\nSystemRolePermissionRelation{" +
            "id=" + id +
            ", roleId=" + roleId +
            ", permissionId=" + permissionId +
        "}";
    }
}
